<%@ page pageEncoding="utf-8"%> 


<style>
	table{
		margin:0;
		padding:0;
		border-collapse:collapse;
		border:0;
		cellpadding:0;
		cellspacing:0; 
		width:100%;
		//height:100%;
	}
	
	td{
		text-align:center;
		vertical-align:middle;
		line-height:30px;
		font-size:13px;
		border-collapse:collapse;
		border:1px solid black;
		margin:0;
		padding:0;
		
	}

	.tdLeft{
		align:left;
		text-align:left;
		padding-left:20px;
		
	}
</style>
<script type='text/javascript'>
	function editlistcourse()
	{
		var span_v = document.getElementById('course_span').value;
		var credit_v = document.getElementById('credit').value;
		var students_max_v = document.getElementById('students_max').value;
		var students_min_v = document.getElementById('students_min').value;
		
		if( ( (students_max_v !='') && (String(parseInt(students_max_v))!== students_max_v) ) || ( (students_min_v != '') && (String(parseInt(students_min_v))!== students_min_v) ) )
		{
			alert("限制人数必须为整数!");
			document.getElementById('students_max').focus;
			return false;
		}
		
		if( ( (span_v != '') && isNaN(span_v) ) || ( (credit_v != '') && isNaN(credit_v) ) )
		{
			alert("总学时数或课程学分不是有效的数字!");
			return false;
		}

	   	document.editlistform.submit();
	}
</script>
<div style="width:100%; margin:1px;text-align:center;margin-top:10px;">
 	<p style="border:0;font-size:14px;padding-bottom:0;">
  		<b>浙江省温岭中学课程批量编辑</b>
	</p>
		<form action="../Admin/editselectCourse.do" name="editlistform" method="post">
 		<table style="width:80%; margin-left:10%;">
 			<tr>
 				<td>总学时数</td>
 				<td class="tdLeft"><input type="text" size="20" name="course_span" id="course_span"/></td>
 			</tr>
 			<tr>
 				<td>课程学分</td>
 				<td class="tdLeft"><input type="text" size="20" name="credit" id="credit"/></td>
 			</tr>
 			<tr>
 				<td>限制人数</td>
 				<td class="tdLeft"><input type="text" size="10" name="students_max" id="students_max"/>/<input type="text" size="10" name="students_min" id="students_min"/> (最多/最少)</td>
 			</tr>
 			<tr>
 				<td>面向年级</td>
 				<td class="tdLeft">
 					<input type="checkbox" name="grade" value="高一年级" />高一年级&nbsp;&nbsp;
 					<input type="checkbox" name="grade" value="高二年级" />高二年级&nbsp;&nbsp;
 					<input type="checkbox" name="grade" value="高三年级" />高三年级&nbsp;&nbsp;
 				</td>
 			</tr>
 			<tr>
 				<td>上课时间</td>
 				<td class="tdLeft"><input type="text" size="50" name="time"/></td>
 			</tr>
 		</table>
		<div id="btn" style="width:100%;align:right;">
			<input type="reset" name="Reset" value="重置"  style="margin-left:58%;"/>&nbsp;&nbsp;&nbsp;&nbsp;
      		<input type="button" name="Submit" value="提交" onclick="javascript:editlistcourse()" />
		</div>
		</form>
</div>